package ldkxingzhe.ldkxingzhedemo.service;

import android.app.IntentService;
import android.content.Intent;
import android.util.Log;

/**
 * Created by liangdengke on 2015/8/17.
 */
public class IntentServiceService extends IntentService{

    /**
     * Creates an IntentService.  Invoked by your subclass's constructor.
     *
     * @param name Used to name the worker thread, important only for debugging.
     */
    public IntentServiceService(String name) {
        super(name);
        Log.d("TAG","constructor, IntentServiceService");
    }
    public IntentServiceService(){
        super("test");
        Log.d("TAG","constructor, ()");
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        Log.d("TAG","Thread = " + Thread.currentThread());
        try {
            Thread.sleep(3000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        Log.d("TAG","onHandleIntent");
    }
}
